import Cart from '../pages/Cart'
import Cate from '../pages/Cate'
import Home from '../pages/Home'
import Login from '../pages/Login'
import Res from '../pages/Res'
import Uncenter from '../pages/Uncenter'
import GoodsList from '../pages/GoodsList'
import GoodsDetail from '../pages/GoodsDetail'

const rules =[
    {
        path:'/',
        redirect:'/home',
        exact:true,
        meta:{
            mustLogin:false,
            title:'首页'
        }
    },
    {
        path:'/home',
        component:Home,
        exact:false,
        meta:{
            mustLogin:false,
            title:'首页'
        }
    },
    {
        path:'/cart',
        component:Cart,
        exact:false,
        meta:{
            mustLogin:true,
            title:'购物车'
        }
    },
    {
        path:'/cate',
        component:Cate,
        exact:false,
        meta:{
            mustLogin:false,
            title:'商品分类'
        }
    },
    {
        path:'/login',
        component:Login,
        exact:false,
        meta:{
            mustLogin:false,
            title:'用户登录'
        }
    },
    {
        path:'/res',
        component:Res,
        exact:false,
        meta:{
            mustLogin:false,
            title:'用户注册'
        }
    },
    {
        path:'/uncenter',
        component:Uncenter,
        exact:false,
        meta:{
            mustLogin:true,
            title:'个人中心'
        }
    },
    {
        path:'/goodslist',
        component:GoodsList,
        exact:false,
        meta:{
            mustLogin:true,
            title:'商品列表'
        }
    },
    {
        path:'/goodsdetail/:id/',
        component:GoodsDetail,
        exact:false,
        meta:{
            mustLogin:true,
            title:'商品详情'
        }
    },
]

export default rules